USE [HomestayWebDB]
GO

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		
-- Create date: 
-- Description:	
-- =============================================
IF EXISTS (SELECT * FROM sys.objects WHERE type = 'P' AND name = 'Store_Region_SelectDistrict')
DROP PROCEDURE Store_Region_SelectDistrict
GO

CREATE PROCEDURE [dbo].[Store_Region_SelectDistrict]
@parentID int=null
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
SELECT
		  Regions.RegionID
		, Regions.Name
		, Regions.Level
		, Regions.ParentID
		, Regions.ParentName
		, Regions.IsDeleted

	FROM Regions
	WHERE Regions.ParentID=@parentID

	
END

GO